package com.wc.算法基础课.B第二讲数据结构.散列表.字符串哈希;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/3/21 14:46
 * @description https://www.acwing.com/problem/content/843/
 */
public class Main {
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 100010;
    static long[] h = new long[N], p = new long[N];
    static int P = 131;
    static int n, m;
    static char[] s = new char[N];

    public static void main(String[] args) {
        n = sc.nextInt();
        m = sc.nextInt();
        s = (" " + sc.next()).toCharArray();
        p[0] = 1;
        for (int i = 1; i <= n; i++) {
            p[i] = p[i - 1] * P;
            h[i] = h[i - 1] * P + s[i];
        }
        while (m-- > 0) {
            int l1, r1, l2, r2;
            l1 = sc.nextInt();
            r1 = sc.nextInt();
            l2 = sc.nextInt();
            r2 = sc.nextInt();
            out.println(getH(l1, r1) == getH(l2, r2) ? "Yes" : "No");
        }
        out.flush();
    }

    static long getH(int l, int r) {
        return h[r] - h[l - 1] * p[r - l + 1];
    }

}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}
